package cn.itcast.spring.demo8;

import static org.junit.Assert.*;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(value="classpath:applicationContext2.xml")
public class AnnoTestCase {

	
	@Autowired
	private People people;
	
	@Autowired
	private Cat cat;
	
	
	
	@Test
	public void getPeople() throws Exception {
		people.eat();
		System.out.println(people.getPeopleName());
		people.getCat().catVoice();
	}
	

}
